[HVM][SVM] Save/restore: set CPL from SS.DPL on restore
authorTim Deegan <Tim.Deegan@xensource.com>
Fri, 13 Apr 2007 16:17:21 +0000 (17:17 +0100)
committerTim Deegan <Tim.Deegan@xensource.com>
Fri, 13 Apr 2007 16:17:21 +0000 (17:17 +0100)
(not needed on VMX, which doesn't keep the CPL separately from SS.DPL)
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/hvm/svm/svm.c

index 5f06d09c08d3323a162c5afdee9d17cd4149760f..d0afe8d6563b329103d59ca04dba25d44d972b8d 100644 (file)
@@ -397,6 +397,7 @@ int svm_vmcb_restore(struct vcpu *v, struct hvm_hw_cpu *c)
     vmcb->ss.limit      = c->ss_limit;
     vmcb->ss.base       = c->ss_base;
     vmcb->ss.attr.bytes = c->ss_arbytes;
+    vmcb->cpl           = vmcb->ss.attr.fields.dpl;
 
     vmcb->fs.sel        = c->fs_sel;
     vmcb->fs.limit      = c->fs_limit;